package cn.lopr.im.android.bean;


import java.io.Serializable;
import java.util.Date;

import cn.lopr.im.android.mvp.view.adapters.base.SortModel;

/**
 * 继承SortModel 用于contact排序展示
 * <p>
 * 见定义 {@link cn.lopr.im.android.mvp.view.adapters.base.SortModel}
 *
 * @author shuangyang7
 * @date 2020/12/29 21:26
 */
public class User extends SortModel implements Serializable {

    private static final long serialVersionUID = -7060210544600464481L;

    private Integer id;

    private String phone;

    private String password;

    private String nickname;

    private String sex;

    private Date birthday;

    private String portrait;

    private String introduction;

    private boolean apply;

    public boolean isApply() {
        return apply;
    }

    public void setApply(boolean apply) {
        this.apply = apply;
    }

    public Integer getId() {
        return id;
    }

    public User setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getPhone() {
        return phone;
    }

    public User setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
        return this;
    }

    public String getPassword() {
        return password;
    }

    public User setPassword(String password) {
        this.password = password == null ? null : password.trim();
        return this;
    }

    public String getNickname() {
        return nickname;
    }

    public User setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
        // 这里设置 父类的name属性，用于排序
        super.setName(this.nickname);
        return this;
    }

    public String getSex() {
        return sex;
    }

    public User setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
        return this;
    }

    public Date getBirthday() {
        return birthday;
    }

    public User setBirthday(Date birthday) {
        this.birthday = birthday;
        return this;
    }

    public String getPortrait() {
        return portrait;
    }

    public User setPortrait(String portrait) {
        this.portrait = portrait == null ? null : portrait.trim();
        return this;
    }

    public String getIntroduction() {
        return introduction;
    }

    public User setIntroduction(String introduction) {
        this.introduction = introduction == null ? null : introduction.trim();
        return this;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", portrait='" + portrait + '\'' +
                ", introduction='" + introduction + '\'' +
                '}';
    }
}
